﻿/*
* SingleWellAssess1.cs
*
* 功 能： 辅助分析-单井评价模块的后台类
* 类 名： SingleWellAssess1
*
* Ver    变更日期  20131126   负责人  黄永生  变更内容
* ───────────────────────────────────
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using Maticsoft.Common;
using DQYT.HTDZ.DBUtility;
using DQYT.HTDZ.BusinessService;
using System.Xml;
using System.Text;
using System.Drawing;
using DQYT.HTDZ.Common;
using DQYT.HTDZ.BLL;
using DQYT.HTDZ.Model;
using DQYT.HTDZ.ISinglewellEvaluationService;
using DQYT.HTDZ.SinglewellEvaluationService;
namespace DQYT.HTDZ.Web.Views.Analysis
{
    public partial class singletest : System.Web.UI.Page
    {
        private BDVALUEModel valuemodel;//特征值Model
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BDValueFunc fun = new BDValueFunc();
                valuemodel = fun.getValueModel("赵57-15X", "2012/3/20 00:00:00");
                //根据抽油机ID获得抽油机相关信息 
                //根据电机ID获得电机相关信息
                init();
            }
        }
        /// <summary>
        /// 初始化界面
        /// </summary>
        protected void init()
        {
            this.txt_SXDLMAX.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.SXDLMAX, 2).ToString();
            this.txt_XXDLMAX.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.XXDLMAX, 2).ToString();
            this.txt_DDZDZPHD.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.DDZDZPHD, 2).ToString();
            this.txt_SXYGPJZ.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.SXYGPJZ, 2).ToString();
            this.txt_XXYGPJZ.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.XXYGPJZ, 2).ToString(); 
            this.txt_YGPJZPHD.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.YGPJZPHD, 2).ToString(); 
            this.txt_SXYGMAX.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.SXYGMAX, 2).ToString();
            this.txt_XXYGMAX.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double) valuemodel.XXYGMAX, 2).ToString();
            this.txt_YGZDZPHD.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double) valuemodel.YGZDZPHD, 2).ToString();
            this.txt_RWGNH.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double) valuemodel.RWGNH, 2).ToString();
            this.txt_RYGZNH.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.RYGZNH, 2).ToString(); 
            this.txt_RYGFNH.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.RYGFNH, 2).ToString(); 
            this.txt_YGFZL.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.YGFZL, 2).ToString(); 
            this.txt_YGPZL.Text = (valuemodel.CYJCC == 9999999) ? " " : Math.Round((double)valuemodel.YGPZL, 2).ToString(); 
            initDdlWellID();

        }
        /// <summary>
        /// 初始化方案列表
        /// </summary> 
        protected void initDdlWellID()
        {
            AnalysisFunc fun = new AnalysisFunc();
            DataTable dt = new DataTable();
            dt = fun.getSchemeList();
            this.ddl_scheme.Items.Clear();
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ListItem item = new ListItem();
                item.Text = dt.Rows[i]["SCHEME_NAME"].ToString();
                item.Value = dt.Rows[i]["SCHEME_ID"].ToString();
                this.ddl_scheme.Items.Add(item);
                this.ddl_scheme.DataBind();
            }

        }

      
    }
}